<template>
  <div>
    <div class="success" v-if="state===1">
      <h2>{{ $t('dialog.success') }}</h2>
      <p>{{ $t('dialog.congratulationsYourTokensAreNowBuyed') }}</p>
      <div class="btn" @click="close">
        {{ $t('dialog.done') }}
      </div>
    </div>
    <div class="failed" v-else>
      <h2>{{ $t('dialog.failed') }}</h2>
      <p>{{ $t('dialog.failedPleaseTryAgainLater') }}</p>
      <div class="btn" @click="close">
        {{ $t('dialog.done') }}
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: "withdrawCard",
  props: {
    state:{
      default:0,
      required:true
    }
  },
  methods:{
    close(){
      this.$emit("close")
    }
  }
}
</script>

<style scoped >
h2{
  font-size: 20px;
  margin:10px;
  font-weight: bold;
}
p{
  margin: 20px;
}
.success,.failed{
  position: fixed;
  width: 350px;
  height: 170px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px;
  text-align: center;
  border: 1px solid #fff;
  background: #fff;
  box-shadow: 0px 0px 2px rgba(108, 108, 108, 0.28);
  border-radius:2px;
}
.btn{
  background-color: #7bba55;
  color: #fff;
  text-align: center;
  padding: 15px 10px;
  font-size: 20px;
  box-shadow: #0ec008 0px 0px 2px;
  border-radius: 5px;
  margin: 10px 0;
  transform: scale(0.9);
  cursor: pointer;
}

</style>
